#ifndef TIMERWIDGET_H
#define TIMERWIDGET_H

#include <QTimer>
#include <QWidget>
#include <QTime>

#include <QDebug>

namespace Ui {
class TimerWidget;
}

class TimerWidget : public QWidget
{
    Q_OBJECT

public:
    explicit TimerWidget(QWidget *parent = nullptr);
    ~TimerWidget();

    void start();

    void stop();

private slots:
    void slot_addSecond();

private:
    void setTimeLabel(QTime t);

private:
    Ui::TimerWidget *ui;
    QTimer m_timer;
    QTime m_currentTime;
};

#endif // TIMERWIDGET_H
